package fitbook.main;

import android.app.Activity;
import android.app.TabActivity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class Create extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		// load up the layout
		setContentView(R.layout.create);

		// get the button resource in the xml file and assign it to a local
		// variable of type Button
		Button launch = (Button) findViewById(R.id.create_button);
		// this is the action listener
		launch.setOnClickListener(new OnClickListener() {

			public void onClick(View viewParam) {
				// this gets the resources in the xml file and assigns it to a
				// local variable of type EditText
				EditText fullnameEditText = (EditText) findViewById(R.id.txt_fullname);
				EditText usernameEditText = (EditText) findViewById(R.id.txt_username);
				EditText passwordEditText = (EditText) findViewById(R.id.txt_password);
				EditText confirmEditText = (EditText) findViewById(R.id.txt_confirm);
				EditText emailEditText = (EditText) findViewById(R.id.txt_email);

				// the getText() gets the current value of the text box
				// the toString() converts the value to String data type
				// then assigns it to a variable of type String
				String sFullName = fullnameEditText.getText().toString();
				String sUserName = usernameEditText.getText().toString();
				String sPassword = passwordEditText.getText().toString();
				String sConfirm = confirmEditText.getText().toString();
				String sEmail = emailEditText.getText().toString();

				// this just catches the error if the program cant locate the
				// GUI stuff
				/*
				 * if(usernameEditText == null || passwordEditText == null){
				 * showAlert("Crap!",
				 * "Couldn't find the 'txt_username' or 'txt_password' " +
				 * "EditView in main.xml", "Oh shit!", false); }else{ // display
				 * the username and the password in string format
				 * showAlert("Logging in", "Username: " + sUserName +
				 * "nPassword: " + sPassword , "Ok", true); }
				 */
			}
		}

		); // end of launch.setOnclickListener

	}
}